package cn.lanqiao;

public class Demo {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {// 行          i = 0, 1, 2, 3, 4
            for (int j = 0; j < i + 1; j++) { // 列 j = 1 ,2 ,3, 4, 5
                System.out.print("*  ");
            }
            System.out.println();
        }

        for (int i = 0; i < 5; i++) {// 行        i = 0, 1, 2, 3, 4
            // 空格
            for (int j = 0; j < 4 - i; j++) {//        j =   4,3,2,1,0
                System.out.print("  ");
            }
            // *
            for (int j = 0; j < i + 1; j++) { // 列 j = 1 ,2 ,3, 4, 5
                System.out.print("*   ");
            }
            System.out.println();
        }
        for (int i = 0; i < 4; i++) {//0,1,2,3
            for (int j = 0; j < i+1; j++) {//1,2,3,4
                System.out.print("  ");
            }
            for (int j = 0; j < 4-i; j++) {//4,3,2,1
                System.out.print("*   ");
            }
            System.out.println();
        }
    }
}
